/*
** make_read.c for my_select in /home/nadali_t//local/svn/tek2ed/my_select
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Sun Nov 25 15:50:46 2012 thomas nadalie
** Last update Sun Nov 25 17:21:42 2012 thomas nadalie
*/

#include	"my.h"

void		make_read(t_list *(**functab)(t_list *list), int *itab, t_list *list)
{
  int		i;
  int		buff;
  t_list	*tmp;

  tmp = list->next;
  while (42)
    {
      i = 0;
      buff = 0;
      if ((read(0, &buff, 4)) == -1)
	my_put_error("Read failed\n");
      while (itab[i])
	{
	  //tputs(tgetstr("us", 0), 1, my_putchar);
	  if (itab[i] == buff)
	    tmp = functab[i](tmp);
	  i++;
	}
    }
}
